package wsz.user.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import wsz.user.client.fallback.ServiceCodeClientFallBack;
import wsz.util.CommonResult;

/**
 * Feign服务调用
 * @author wsz
 * @date 2021/12/27 11:35
 **/
@Component
@FeignClient(name = "service-code", path = "code", fallback = ServiceCodeClientFallBack.class)
public interface ServiceCodeClient {

    @RequestMapping(value = "validate/{email}/{code}", method = RequestMethod.GET)
    CommonResult validate(@PathVariable(name = "email") String email,
                          @PathVariable(name = "code") String code);
}
